﻿     <div class="pagination">
         @if (ViewBag.currentPage == 1)
         {
             <span class="disabled">first</span>
             <span class="disabled">< prev</span>
         }
         else
         
         {
             <span>

                 @Ajax.ActionLink("first", "UserTable", new { 
            
                  searchString = ViewBag.searchString, 
                  listSelectField = ViewBag.listSelectField, 
                  listSelectCondition = ViewBag.listSelectCondition, 
                  orderUsersBy = ViewBag.currentSortUserBy, 
                  page = ViewBag.currentPage - 1 
        
             },new AjaxOptions{ UpdateTargetId="table"})

             </span>
             
             <span>
                 @Ajax.ActionLink("< prev", "UserTable", new { 
                  searchString = ViewBag.searchString, 
                  listSelectField = ViewBag.listSelectField, 
                  listSelectCondition = ViewBag.listSelectCondition, 
                  orderUsersBy = ViewBag.currentSortUserBy, 
                  page = ViewBag.currentPage - 1 
                  
              }, new AjaxOptions{ UpdateTargetId="table"})

             </span>
             
             
         }
         <span>

             @Ajax.ActionLink("next >", "UserTable", new {
            
              searchString =ViewBag.searchString, 
              listSelectField =ViewBag.listSelectField, 
              listSelectCondition = ViewBag.listSelectCondition, 
              orderUsersBy = ViewBag.currentSortUserBy, 
              page = ViewBag.currentPage + 1 
              
          }, new AjaxOptions{ UpdateTargetId="table"})

         </span>
         <span>
             @Ajax.ActionLink("last", "UserTable", new {
              
              searchString =ViewBag.searchString, 
              listSelectField =ViewBag.listSelectField, 
              listSelectCondition = ViewBag.listSelectCondition, 
              orderUsersBy = ViewBag.currentSortUserBy, 
              page = ViewBag.currentPage + 1 
              
          }, new AjaxOptions{ UpdateTargetId="table"})

         </span>
    </div>